package com.baomidou.springmvc.exception.myexception;

import com.baomidou.springmvc.common.result.ResponseCodeEnum;

public class ServiceException extends RuntimeException{
	/**
	 * 
	 */
	private static final long serialVersionUID = 7776650301603001570L;
	private Integer code;
	private String msg;
	public Integer getCode() {
		return code;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public ServiceException(Integer code, String msg) {
		this.code = code;
		this.msg = msg;
	}
	public ServiceException(String msg) {
		this.code = ResponseCodeEnum.ERROR.getCode();
		this.msg = msg;
	}
	
	
}
